Practical Implementation of Queue in Python